package com.zhouyu.controller;

import com.zhouyu.entity.User;
import com.zhouyu.service.ZhouyuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class ZhouyuController {

	@Autowired
	private ZhouyuService zhouyuService;

	/**
	 * @RequestPart:获取表单里面的参数
	 *
	 * @param user
	 * @return
	 */
	@GetMapping("/test")
	@ResponseBody
	public String test(User user) {
		System.out.println(user);
		return "zhouyu";
	}


	//@InitBinder
	//public void initBinder(WebDataBinder binder) {
	//	//注册一个自定义类型转换器
	//	binder.registerCustomEditor(User.class, new StringToUserEditor());
	//}

}
